<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>添加工程</title>
    <link href="../img/icon.ico" rel="shortcut icon" />
    <link rel="stylesheet" href="../layui/css/layui.css" />
    <link rel="stylesheet" href="../css/element.min.css?1" />
    <link rel="stylesheet" href="http://at.alicdn.com/t/font_2315128_5bb2ydgeqs.css">
    <link rel="stylesheet" href="../css/reset.css?3123">
    <link rel="stylesheet" href="../css/setlayui.css?12">
    <link rel="stylesheet" href="../css/viewer.min.css">
    <script src="../layui/layui.all.js"></script>
    <script type="text/javascript" src="../js/jquery.min.js"></script>
    <script type="text/javascript" src="../js/vue.min.js"></script>
    <script type="text/javascript" src="../js/element.min.js"></script>
    <script src="../js/viewer.min.js"></script>
</head>

<body>
    <div id="app" class="page-container" style="display: none;" v-show="showApp">
        <div class="contetn_box">
            <div style="width: 46.87vw;float: left;">
                <div class="cell_box">
                    <div class="cell_title">
                        <div class="cell_name">工程信息:</div>
                        <div class="cell_but"></div>
                    </div>
                    <div class="cell_cont" style="height: 300px;display: flex;flex-wrap: wrap;">
                        <div class="form_box">
                            <div class="form_name ">工程编号</div>
                            <div class="form_cont">{{baseinfo.projectId}}</div>
                        </div>
                        <div class="form_box" style="margin-left: 30px;">
                            <div class="form_name must_input">工程名称</div>
                            <div class="form_cont" style="width: calc(100% - 104px);">
                                <el-tooltip class="item" effect="dark" :disabled="!baseinfo.name"
                                    :content="baseinfo.name" placement="top">
                                    <el-input disabled class="public_input" placeholder="请输入" v-model="baseinfo.name"
                                        clearable> </el-input>
                                </el-tooltip>
                            </div>
                        </div>
                        <div class="form_box">
                            <div class="form_name">建设单位</div>
                            <div class="form_cont">
                                <el-tooltip class="item" effect="dark" :disabled="!baseinfo.constructionUnitName"
                                    :content="baseinfo.constructionUnitName" placement="top">
                                    <el-input disabled class="public_input" placeholder="请选择"
                                        v-model="baseinfo.constructionUnitName"> </el-input>
                                </el-tooltip>
                            </div>
                            <div class="form_but">
                                <!-- <el-button @click="choiceGys" class="border_but" type="primary">选择</el-button> -->
                            </div>
                        </div>
                        <div class="form_box" style="margin-left: 30px;">
                            <div class="form_name">施工许可证号</div>
                            <div class="form_cont" style="width: calc(100% - 104px);">
                                <el-tooltip class="item" effect="dark" :disabled="!baseinfo.license"
                                    :content="baseinfo.license" placement="top">
                                    <el-input disabled class="public_input" placeholder="请输入" v-model="baseinfo.license"
                                        clearable> </el-input>
                                </el-tooltip>
                            </div>
                        </div>
                        <div class="form_box">
                            <div class="form_name must_input">工程位置</div>
                            <div class="form_cont">
                                <el-tooltip class="item" effect="dark" :disabled="!baseinfo.address"
                                    :content="baseinfo.address" placement="top">
                                    <el-input disabled class="public_input" placeholder="请选择"
                                        v-model="baseinfo.address"> </el-input>
                                </el-tooltip>
                            </div>
                            <div class="form_but">
                                <!-- <el-button @click="choiceMapSpot" style="width: 62px;padding: 0;" class="border_but" type="primary">GPS选点</el-button> -->
                            </div>
                        </div>
                        <div class="form_box" style="margin-left: 30px;">
                            <div class="form_name">项目赋码</div>
                            <div class="form_cont" style="width: calc(100% - 104px);">
                                <el-tooltip class="item" effect="dark" :disabled="!baseinfo.pullCode"
                                    :content="baseinfo.pullCode" placement="top">
                                    <el-input disabled class="public_input" placeholder="请输入"
                                        v-model="baseinfo.pullCode" clearable> </el-input>
                                </el-tooltip>
                            </div>
                            <!-- <div class="form_but">
                                    <el-button type="text">购买链接</el-button>
                                </div> -->
                        </div>
                        <!-- <div class="form_box">
                                <div class="form_name ">工程二维码</div>
                                <div class="form_cont" style="color:#FA7355;">保存后自动生成</div>
                            </div> -->
                        <div class="form_box" style="margin-left: 30px;">
                            <div class="form_name ">项目管理账户</div>
                            <div class="form_cont" style="width: calc(100% - 104px);">{{baseinfo.adminUserName}}</div>
                        </div>
                        <div class="form_box">
                            <div class="form_name">施工单位</div>
                            <div class="form_cont" style="width: calc(100% - 104px);">
                                <el-tooltip class="item" effect="dark" :disabled="!baseinfo.constructionUnit"
                                    :content="baseinfo.constructionUnit" placement="top">
                                    <el-input disabled class="public_input" placeholder="请输入"
                                        v-model="baseinfo.constructionUnit"> </el-input>
                                </el-tooltip>
                            </div>
                        </div>
                        <div class="form_box" >
                            <div class="form_name">监理单位</div>
                            <div class="form_cont" style="width: calc(100% - 104px);">
                                <el-tooltip class="item" effect="dark" :disabled="!baseinfo.constructionControlUnit"
                                    :content="baseinfo.constructionControlUnit" placement="top">
                                    <el-input disabled class="public_input" placeholder="请输入"
                                        v-model="baseinfo.constructionControlUnit" clearable> </el-input>
                                </el-tooltip>
                            </div>
                        </div>
                        <div class="form_box" style="margin-left: 30px;">
                            <div class="form_name">勘察单位</div>
                            <div class="form_cont" style="width: calc(100% - 104px);">
                                <el-tooltip class="item" effect="dark" :disabled="!baseinfo.investigationUnit"
                                    :content="baseinfo.investigationUnit" placement="top">
                                    <el-input disabled class="public_input" placeholder="请输入"
                                        v-model="baseinfo.investigationUnit" clearable> </el-input>
                                </el-tooltip>
                            </div>
                        </div>
                        <div class="form_box">
                            <div class="form_name">设计单位</div>
                            <div class="form_cont" style="width: calc(100% - 104px);">
                                <el-tooltip class="item" effect="dark" :disabled="!baseinfo.designUnit"
                                    :content="baseinfo.designUnit" placement="top">
                                    <el-input disabled class="public_input" placeholder="请输入"
                                        v-model="baseinfo.designUnit" clearable> </el-input>
                                </el-tooltip>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="cell_box" style="margin-top: 20px;">
                    <div class="cell_title">
                        <div class="cell_name" style="white-space: nowrap;">主体信息:</div>
                        <div class="cell_but">
                            <!-- <el-button class="border_but" @click="addFloor" type="primary">新增</el-button> -->
                        </div>
                        <div class="cell_but" style="color: #999;font-size: 0.85vw;">
                            编辑工程内的楼宇主体信息，以便后续查看施工进度
                        </div>
                    </div>
                    <div class="cell_cont" style="height: 300px;">
                        <div class="item_tab" v-if="projectMainList.length > 0">
                            <div class="tab_box">
                                <el-tabs type="card" v-model="ztTabId">
                                    <el-tab-pane :name="'x' + index" v-for="(item, index) in projectMainList"
                                        :key="index">
                                        <div slot="label" class="tab_title">
                                            <div>{{(index + 1) + '号'}}</div>
                                            <!-- <div v-if="item.isAdd" @click="removeImg(projectMainList, index, 2)" class="el-icon-circle-close" style="margin-left: 10px;"></div> -->
                                        </div>
                                    </el-tab-pane>
                                    <!-- <el-tab-pane disabled>
                                            <div slot="label" @click="addFloor" class="tab_title" style="color: #333333;cursor: pointer;padding: 0 20px;">
                                                <div>新增</div>
                                                <div class="el-icon-circle-plus-outline" style="margin-left: 10px;"></div>
                                            </div>
                                        </el-tab-pane> -->
                                </el-tabs>
                            </div>
                            <div class="tab_cont" style="padding: 20px 2.08vw;">
                                <div style="display: flex;flex-wrap: wrap;height: 100%;width: 100%;"
                                    v-for="(item, index) in projectMainList" :key="index"
                                    v-show="ztTabId == 'x' + index">
                                    <div class="tab_form_box" style="width: 25%;">
                                        <div class="tab_form_name must_input" style="width: 64px;">楼名称</div>
                                        <div class="tab_form_cont" style="width: calc(100% - 64px);">
                                            <el-tooltip class="item" effect="dark" :disabled="!item.name"
                                                :content="item.name" placement="top">
                                                <el-input disabled class="public_input" placeholder=""
                                                    v-model="item.name"> </el-input>
                                            </el-tooltip>
                                        </div>
                                    </div>
                                    <div class="tab_form_box" style="width: 25%;">
                                        <div class="tab_form_name" style="width: 76px;">总楼层数</div>
                                        <div class="tab_form_cont" style="width: calc(100% - 76px)">
                                            <el-tooltip class="item" effect="dark" :disabled="!item.floor"
                                                :content="item.floor" placement="top">
                                                <el-input disabled class="public_input" placeholder=""
                                                    v-model="item.floor"> </el-input>
                                            </el-tooltip>
                                        </div>
                                    </div>
                                    <div class="tab_form_box" style="width: 25%;">
                                        <div class="tab_form_name must_input">地上楼层数</div>
                                        <div class="tab_form_cont">
                                            <el-tooltip class="item" effect="dark" :disabled="!item.topFloor"
                                                :content="item.topFloor" placement="top">
                                                <el-input disabled class="public_input" @change="ztFloorChange(item)"
                                                    type="number" placeholder="" v-model="item.topFloor"> </el-input>
                                            </el-tooltip>
                                        </div>
                                    </div>
                                    <div class="tab_form_box" style="width: 25%;">
                                        <div class="tab_form_name must_input">地下室层数</div>
                                        <div class="tab_form_cont">
                                            <el-tooltip class="item" effect="dark" :disabled="!item.downFloor"
                                                :content="item.downFloor" placement="top">
                                                <el-input disabled class="public_input" @change="ztFloorChange(item)"
                                                    type="number" placeholder="" v-model="item.downFloor"> </el-input>
                                            </el-tooltip>
                                        </div>
                                    </div>
                                    <div class="tab_form_box" style="width: calc(100% / 3);">
                                        <div class="tab_form_name must_input" style="width: 105px;">地基基础类型</div>
                                        <div class="tab_form_cont" style="width: calc(100% - 105px);">
                                            <el-tooltip class="item" effect="dark" :disabled="!item.foundationName"
                                                :content="item.foundationName" placement="top">
                                                <el-select disabled class="public_input" v-model="item.foundationId"
                                                    clearable placeholder="请选择">
                                                    <el-option v-for="item2 in djData" :key="item2.id"
                                                        :label="item2.name" :value="item2.id + ''">
                                                    </el-option>
                                                </el-select>
                                            </el-tooltip>

                                        </div>
                                    </div>
                                    <div class="tab_form_box" style="width: calc(100% / 3);">
                                        <div class="tab_form_name must_input">屋顶结构</div>
                                        <div class="tab_form_cont">
                                            <el-tooltip class="item" effect="dark" :disabled="!item.roofName"
                                                :content="item.roofName" placement="top">
                                                <el-select disabled class="public_input" v-model="item.roofId" clearable
                                                    placeholder="请选择">
                                                    <el-option v-for="item2 in wdjgData" :key="item2.id"
                                                        :label="item2.name" :value="item2.id + ''">
                                                    </el-option>
                                                </el-select>
                                            </el-tooltip>

                                        </div>
                                    </div>
                                    <div class="tab_form_box" style="width: calc(100% / 3);">
                                        <div class="tab_form_name must_input">结构类型</div>
                                        <div class="tab_form_cont">
                                            <el-tooltip class="item" effect="dark" :disabled="!item.structureName"
                                                :content="item.structureName" placement="top">
                                                <el-select disabled class="public_input" v-model="item.structureId"
                                                    clearable placeholder="请选择">
                                                    <el-option v-for="item2 in jglxData" :key="item2.id"
                                                        :label="item2.name" :value="item2.id + ''">
                                                    </el-option>
                                                </el-select>
                                            </el-tooltip>

                                        </div>
                                    </div>
                                    <div class="tab_form_box" style="width:100%;">
                                        <div class="tab_form_name" style="width: 70px;">主体描述</div>
                                        <div class="tab_form_cont" style="width: calc(100% - 70px)">
                                            <el-tooltip class="item" effect="dark" :disabled="!item.description"
                                                :content="item.description" placement="top">
                                                <el-input disabled class="public_input" placeholder=""
                                                    v-model="item.description"> </el-input>
                                            </el-tooltip>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="cell_box" style="margin-top: 20px;">
                    <div class="cell_title">
                        <div class="cell_name">附件:</div>
                        <div class="cell_but">
                            <!-- <el-upload
                                    class="upload-demo"
                                    action="##"
                                    :show-file-list="false"
                                    :http-request="httprequest"
                                    multiple>
                                    <el-button class="border_but" type="primary">上传附件</el-button>
                                </el-upload> -->
                        </div>
                    </div>
                    <div class="cell_cont" style="height: 280px;">
                        <div class="table_box border_table_box" style="height: 100%;">
                            <el-table :data="fileList" height="100%" border style="width: 100%">

                                <el-table-column prop="filename" align="center" show-overflow-tooltip label="名称">
                                </el-table-column>

                                <el-table-column prop="userName" align="center" show-overflow-tooltip label="上传人"
                                    width="70">
                                </el-table-column>

                                <el-table-column prop="uploadTime" align="center" show-overflow-tooltip label="上传时间"
                                    width="160">
                                </el-table-column>

                                <el-table-column align="center" show-overflow-tooltip label="操作" width="140">
                                    <template slot-scope="scope">
                                        <el-button @click="prevewImg(scope.row.filename, scope.row.fileurl)"
                                            type="text">查看</el-button>
                                        <el-button @click="downImg(scope.row.filename, scope.row.fileurl)" type="text">
                                            下载</el-button>
                                        <!-- <el-button @click="removeImg(fileList, scope.$index)" type="text">删除</el-button> -->
                                    </template>
                                </el-table-column>
                            </el-table>
                        </div>
                    </div>
                </div>
            </div>
            <div class="cell_box" style="width: 47.96vw;float: right;height: 1076px;">
                <div class="cell_title">
                    <div class="cell_name">管理人员信息:</div>
                    <div class="cell_but"></div>
                </div>
                <div class="cell_cont" style="padding-right: 0;height: calc(100% - 52px);">
                    <div style="color: #666666;padding-bottom: 10px;">所有默认账号为“姓名拼音首字母+身份证号后四位”，默认密码为88888</div>
                    <div class="ry_list" style="padding-right: 2.43vw;height: calc(100% - 30px);overflow: auto;">
                        <div class="ry_item" v-for="(item, index) in allryList" :key="index">
                            <div style="display: flex;">
                                <div class="ry_top">
                                    <div class="ry_title">{{item.gw}}</div>
                                    <div class="ry_but">
                                        <!-- <el-button @click="glryAdd(item)" class="border_but" type="primary">新增</el-button> -->
                                    </div>
                                </div>
                                <div class="ry_top" style="margin-left: 20px;">
                                    <div class="ry_title">{{item.gw}}助理人员</div>
                                    <div class="ry_but">
                                        <!-- <el-button @click="zlryAdd(item)" class="border_but" type="primary">新增</el-button> -->
                                    </div>
                                </div>
                            </div>
                            <div class="ry_cont" v-if="item.ryList.length">
                                <div class="ry_tab tab_box">
                                    <el-tabs type="card" v-model="item.ryTabId">
                                        <el-tab-pane :name="'z' + index2" v-for="(item2, index2) in item.ryList"
                                            :key="index2">
                                            <div slot="label" class="tab_title">
                                                <div>{{item.gw + (index2 + 1)}}</div>
                                                <!-- <div v-if="item2.oper == 'add'" @click="removeImg(item.ryList, index2, 3, item)" class="el-icon-circle-close" style="margin-left: 10px;"></div> -->
                                            </div>
                                        </el-tab-pane>
                                    </el-tabs>
                                </div>
                                <div class="ry_tab_cont" v-show="item.ryTabId == 'z' + index2"
                                    v-for="(item2, index2) in item.ryList" :key="index2">
                                    <div class="ry_tab_cont_form">
                                        <div class="ry_form_box">
                                            <div class="ry_form_name must_input">姓名</div>
                                            <div class="ry_form_cont" style="width: 100px;">
                                                <el-tooltip class="item" effect="dark" :disabled="!item2.ryxm"
                                                    :content="item2.ryxm" placement="top">
                                                    <el-input disabled class="public_input" placeholder="请输入"
                                                        v-model="item2.ryxm" clearable> </el-input>
                                                </el-tooltip>
                                            </div>
                                        </div>
                                        <div class="ry_form_box" style="margin-left: 10px;">
                                            <div class="ry_form_name must_input">身份证号</div>
                                            <div class="ry_form_cont" style="width: 188px;">
                                                <el-tooltip class="item" effect="dark" :disabled="!item2.sfzhm"
                                                    :content="item2.sfzhm" placement="top">
                                                    <el-input disabled class="public_input" placeholder="请输入"
                                                        v-model="item2.sfzhm" clearable> </el-input>
                                                </el-tooltip>
                                            </div>
                                        </div>
                                        <div class="ry_form_box" style="margin-left: 10px;">
                                            <div class="ry_form_name must_input">手机号</div>
                                            <div class="ry_form_cont">
                                                <el-tooltip class="item" effect="dark" :disabled="!item2.sjhm"
                                                    :content="item2.sjhm" placement="top">
                                                    <el-input disabled class="public_input" placeholder="请输入"
                                                        v-model="item2.sjhm" clearable> </el-input>
                                                </el-tooltip>
                                            </div>
                                        </div>
                                        <!-- <div class="ry_form_but" @click="inspect(item2.sfzhm)">
                                                检查
                                            </div> -->
                                        <!-- <div class="ry_form_but" @click="rybgBut1(item2)">
                                                变更
                                            </div> -->
                                    </div>

                                    <div v-if="item2.ryList.length > 0" class="ry_tab_cont_tab tab_box">
                                        <el-tabs type="card" v-model="item2.zlTabId">
                                            <el-tab-pane :name="'m' + index3" v-for="(item3, index3) in item2.ryList"
                                                :key="index3">
                                                <div slot="label" class="tab_title">
                                                    <div>助理{{(index3 + 1)}}</div>
                                                    <!-- <div v-if="item3.oper == 'add'" @click="removeImg(item2.ryList, index3, 3, item2)" class="el-icon-circle-close" style="margin-left: 10px;"></div> -->
                                                </div>
                                            </el-tab-pane>
                                        </el-tabs>
                                    </div>
                                    <div class="ry_tab_cont" v-show="item2.zlTabId == 'm' + index3"
                                        v-for="(item3, index3) in item2.ryList" :key="index3">
                                        <div class="ry_tab_cont_form">
                                            <div class="ry_form_box">
                                                <div class="ry_form_name must_input">姓名</div>
                                                <div class="ry_form_cont" style="width: 100px;">
                                                    <el-tooltip class="item" effect="dark" :disabled="!item3.ryxm"
                                                        :content="item3.ryxm" placement="top">
                                                        <el-input disabled class="public_input" placeholder="请输入"
                                                            v-model="item3.ryxm" clearable> </el-input>
                                                    </el-tooltip>
                                                </div>
                                            </div>
                                            <div class="ry_form_box" style="margin-left: 20px;">
                                                <div class="ry_form_name must_input">身份证号</div>
                                                <div class="ry_form_cont">
                                                    <el-tooltip class="item" effect="dark" :disabled="!item3.sfzhm"
                                                        :content="item3.sfzhm" placement="top">
                                                        <el-input disabled class="public_input" placeholder="请输入"
                                                            v-model="item3.sfzhm" clearable> </el-input>
                                                    </el-tooltip>
                                                </div>
                                            </div>
                                            <div class="ry_form_box" style="margin-left: 20px;">
                                                <div class="ry_form_name must_input">手机号</div>
                                                <div class="ry_form_cont">
                                                    <el-tooltip class="item" effect="dark" :disabled="!item3.sjhm"
                                                        :content="item3.sjhm" placement="top">
                                                        <el-input disabled class="public_input" placeholder="请输入"
                                                            v-model="item3.sjhm" clearable> </el-input>
                                                    </el-tooltip>
                                                </div>
                                            </div>
                                            <!-- <div class="ry_form_but" @click="inspect(item3.sfzhm)">
                                                    检查
                                                </div> -->
                                            <!-- <div class="ry_form_but" @click="rybgBut2(item2)">
                                                    变更
                                                </div> -->
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <!-- <div class="but_box">
				<el-button @click="cancels" class="cancelClass">取消</el-button>
				<el-button @click="confirms" type="primary" style="margin-left: 120px">提交</el-button>
            </div> -->
        <ul id="jq22" style="opacity: 0;height: 0;overflow: hidden;">
            <li v-for="(item, index) in previewList" :key="index"><img :src="item" /></li>
        </ul>
        <el-dialog :title="ckmxPopupTitle" :visible.sync="dialogVisible" custom-class="public_popup"
            top="calc(50vh - 170px)" width="432px">
            <div class="public_popup_box">
                <div class="public_popup_cell_box">
                    <div class="public_popup_cell_item">
                        <div class="public_popup_cell_name">姓名</div>
                        <div class="public_popup_cell_cont">
                            <!-- <el-input class="public_input" placeholder="请输入" v-model="bgobj.ryxm" clearable> </el-input> -->
                            <el-autocomplete @blur="ryxmBlur" @select="handleSelect" :fetch-suggestions="querySearch"
                                class="public_input" placeholder="请输入" v-model="bgobj.ryxm" clearable>
                                <template slot-scope="scope">
                                    <div class="name">{{ scope.item.ryxm }}</div>
                                    <span class="addr">{{ scope.item.sfzhm }}</span>
                                </template>
                            </el-autocomplete>
                        </div>
                    </div>
                    <div class="public_popup_cell_item">
                        <div class="public_popup_cell_name">身份证号</div>
                        <div class="public_popup_cell_cont">
                            <el-tooltip class="item" effect="dark" :disabled="!bgobj.sfzhm" :content="bgobj.sfzhm"
                                placement="top">
                                <el-input class="public_input" placeholder="请输入" v-model="bgobj.sfzhm" clearable>
                                </el-input>
                            </el-tooltip>
                        </div>
                    </div>
                    <div class="public_popup_cell_item">
                        <div class="public_popup_cell_name">手机号</div>
                        <div class="public_popup_cell_cont">
                            <el-tooltip class="item" effect="dark" :disabled="!bgobj.sjhm" :content="bgobj.sjhm"
                                placement="top">
                                <el-input class="public_input" placeholder="请输入" v-model="bgobj.sjhm" clearable>
                                </el-input>
                            </el-tooltip>
                        </div>
                    </div>
                </div>
                <div class="but_box">
                    <el-button @click="dialogVisible = false" class="cancelClass">取消</el-button>
                    <el-button type="primary" @click="confirm2s" style="margin-left: 120px">提交</el-button>
                </div>
            </div>
        </el-dialog>
    </div>
    <script src="../js/FileSaver.js"></script>
    <script src="../js/public.js?12345"></script>
    <script>
        var layer = layui.layer
        var vm = new Vue({
            el: '#app',
            data() {
                return {
                    bgobj: {
                        ryxm: '',
                        sfzhm: '',
                        sjhm: '',
                        rybh: ''
                    },
                    restaurants: [],
                    ckmxPopupTitle: '',
                    showApp: false,
                    dialogVisible: false,
                    value: '',
                    options: [],
                    djData: [],
                    wdjgData: [],
                    jglxData: [],
                    previewList: [],
                    fileList: [],
                    input: '',
                    ztTabId: 'x0',
                    mapCity: '',
                    recid: '',
                    allselectRyData: [],
                    baseinfo: {
                        name: '',
                        constructionUnitId: '',
                        constructionUnitName: '',
                        license: '',
                        constructionUnit: '',
                        constructionControlUnit: '',
                        investigationUnit: '',
                        designUnit: '',
                        address: '',
                        coordinate: '',
                        authCode: '',
                        pullCode: ''
                    },
                    projectMainList: [{
                        id: '',
                        name: '',
                        floor: 0,
                        description: '',
                        topFloor: 0,
                        downFloor: 0,
                        structureId: '',
                        roofId: '',
                        foundationId: ''
                    }],
                    allryList: [],
                    companyId: '',
                    bgRyObj: {}
                };
            },
            methods: {
                confirm2s() {
                    var that = this
                    if (this.bgobj.ryxm.length == 0) {
                        this.$message({
                            message: '请输入人员姓名',
                            type: 'warning',
                            duration: 1000
                        });
                        return false
                    }
                    if (this.bgobj.sfzhm.length == 0) {
                        this.$message({
                            message: '请输入人员身份证号',
                            type: 'warning',
                            duration: 1000
                        });
                        return false
                    }
                    if (this.bgobj.sjhm.length == 0) {
                        this.$message({
                            message: '请输入人员手机号',
                            type: 'warning',
                            duration: 1000
                        });
                        return false
                    }
                    var flag = true
                    for (var i = 0; i < this.restaurants.length; i++) {
                        if (this.restaurants[i].sfzhm == this.bgobj.sfzhm) {
                            flag = false
                        }
                    }
                    if (flag) {
                        that.bgobj.rybh = ''
                    }
                    xLoading(true, '正在变更')
                    $.ajax({
                        type: 'post',
                        headers: {
                            token: localStorage.getItem('token'),
                            'Content-Type': 'application/json'
                        },
                        url: baseUrl + '/ConstructionPlan/ChangeProjectUser',
                        data: JSON.stringify({
                            reqMod: {
                                oldrybh: that.bgRyObj.rybh,
                                oldname: that.bgRyObj.ryxm,
                                gW: that.bgRyObj.gw,
                                newrybh: that.bgobj.rybh,
                                name: that.bgobj.ryxm,
                                idCard: that.bgobj.sfzhm,
                                phone: that.bgobj.sjhm
                            }
                        }),
                        dataType: 'json',
                        success: function (res) {
                            xLoading(false)
                            if (!res.success) {
                                that.$message({
                                    message: res.msg ? res.msg : '程序错误，请重试',
                                    type: 'error'
                                });
                                return false;
                            }
                            var html = ''
                            for (var j = 0; j < res.data.length; j++) {
                                var str = '<p>' + res.data[j] + '</p>'
                                html += str
                            }
                            that.dialogVisible = false
                            that.getDetail2()
                            that.$confirm(html, '提示', {
                                confirmButtonText: '确定',
                                cancelButtonText: '取消',
                                showCancelButton: false,
                                customClass: 'tips_popup',
                                closeOnClickModal: false,
                                closeOnPressEscape: false,
                                dangerouslyUseHTMLString: true,
                                type: 'warning'
                            }).then(function () {

                            }).catch(function () {
                            });

                        }
                    });
                },
                ryxmBlur() {
                    for (var i = 0; i < this.restaurants.length; i++) {
                        if (this.restaurants[i].ryxm == this.bgobj.ryxm) {
                            this.bgobj = JSON.parse(JSON.stringify(this.restaurants[i]))
                        }
                    }
                },
                handleSelect(val) {
                    this.bgobj = JSON.parse(JSON.stringify(val))
                },
                querySearch(queryString, cb) {
                    var restaurants = this.restaurants;
                    var results = queryString ? restaurants.filter(this.createFilter(queryString)) : restaurants;
                    // 调用 callback 返回建议列表的数据
                    cb(results);
                },
                createFilter(queryString) {
                    return (restaurant) => {
                        return (restaurant.ryxm && restaurant.ryxm.toLowerCase().indexOf(queryString.toLowerCase()) === 0);
                    };
                },
                rybgBut1(item) {
                    var that = this
                    // this.$confirm('是否变更此人员', '提示', {
                    //     confirmButtonText: '确定',
                    //     cancelButtonText: '取消',
                    //     type: 'warning'
                    // }).then(function () {
                    // }).catch(function () {
                    // });
                    // allselectRyData
                    this.dialogVisible = true
                    this.bgobj = {
                        ryxm: '',
                        sfzhm: '',
                        sjhm: '',
                        rybh: ''
                    }
                    this.ckmxPopupTitle = item.gw + '人员变更'
                    this.bgRyObj = item
                },
                rybgBut2(item) {
                    var that = this
                    // this.$confirm('是否变更此人员', '提示', {
                    //     confirmButtonText: '确定',
                    //     cancelButtonText: '取消',
                    //     type: 'warning'
                    // }).then(function () {
                    // }).catch(function () {
                    // });
                    // allselectRyData
                    this.bgobj = {
                        ryxm: '',
                        sfzhm: '',
                        sjhm: '',
                        rybh: ''
                    }
                    this.dialogVisible = true
                    this.ckmxPopupTitle = item.gw + '助理人员变更'
                    this.bgRyObj = item
                },
                inspect(idCard) {
                    var that = this
                    if (!idCard) {
                        this.$message({
                            message: '请先添加人员',
                            type: 'warning',
                            duration: 1000
                        });
                        return false
                    }
                    xLoading(true)
                    $.ajax({
                        type: 'post',
                        headers: {
                            'Content-Type': 'application/json'
                        },
                        url: baseUrl + '/ConstructionPlan/GetUserInfo',
                        data: JSON.stringify({
                            idCard: idCard
                        }),
                        dataType: 'json',
                        success: function (res) {
                            xLoading(false)
                            if (!res.success) {
                                that.$message({
                                    message: res.msg ? res.msg : '程序错误，请重试',
                                    type: 'error'
                                });
                                return false;
                            }
                            var html = ''
                            for (var j = 0; j < res.data.length; j++) {
                                var str = '<p>' + res.data[j] + '</p>'
                                html += str
                            }
                            that.$confirm(html, '提示', {
                                confirmButtonText: '确定',
                                cancelButtonText: '取消',
                                showCancelButton: false,
                                dangerouslyUseHTMLString: true,
                                type: 'warning'
                            }).then(function () {
                            }).catch(function () {
                            });
                        }
                    });
                },
                glryAdd(item) {
                    item.ryList.push({
                        ryxm: '',
                        gw: item.gw,
                        sfzhm: '',
                        sjhm: '',
                        oper: 'add',
                        ryList: [],
                        zlTabId: 'm0'
                    })
                    item.ryTabId = 'z' + (item.ryList.length - 1)
                },
                zlryAdd(item) {
                    if (item.ryList.length == 0) {
                        this.$message({
                            message: '请先添加' + item.gw,
                            type: 'warning',
                            duration: 1000
                        });
                        return false
                    }
                    var indexs = item.ryTabId.split('z')[1]
                    item.ryList[indexs].ryList.push({
                        ryxm: '',
                        sfzhm: '',
                        oper: 'add',
                        sjhm: '',
                        gw: item.gw,

                    })
                    item.ryList[indexs].zlTabId = 'm' + (item.ryList[indexs].ryList.length - 1)
                    this.$forceUpdate()
                },
                ztFloorChange(item) {
                    item.floor = parseInt(item.topFloor) + parseInt(item.downFloor)
                },
                choiceGys() {
                    var that = this
                    parent.$('#publicValue').val('')
                    parent.layer.open({
                        type: 2,
                        title: '选择建设单位',
                        shadeClose: true,
                        shade: 0.4,
                        skin: 'popup_layui',
                        area: ['60%', '77.77%'],
                        content: '/ApsPublic/publicList/gysList.html?types=3&isSingle=1&companyId=' + that.companyId + '&' + new Date().getTime(),
                        end: function () {
                            setTimeout(function () {
                                if (parent.$('#publicValue').val()) {
                                    var newList = JSON.parse(parent.$('#publicValue').val())
                                    // that.supplier = {
                                    //     supplierId: newList[0].id,
                                    //     supplierName: newList[0].name
                                    // }
                                    that.baseinfo.constructionUnitId = newList[0].id
                                    that.baseinfo.constructionUnitName = newList[0].name
                                }
                            }, 10)
                        }
                    });
                },
                choiceMapSpot() {
                    var that = this
                    parent.$('#publicValue').val('')
                    var mapCity = that.mapCity ? that.mapCity : '杭州市'
                    parent.layer.open({
                        type: 2,
                        title: '选择工程位置',
                        shadeClose: true,
                        shade: 0.4,
                        skin: 'popup_layui',
                        area: ['98%', '98%'],
                        // area: ['91.91%', '72.16%'],
                        content: '/apspublic/gcxx/mapChoice.html?mapCity=' + encodeURIComponent(mapCity) + '&' + new Date().getTime(),
                        end: function () {
                            setTimeout(function () {
                                if (parent.$('#publicValue').val()) {
                                    var newList = JSON.parse(parent.$('#publicValue').val())
                                    that.baseinfo.address = newList.address
                                    that.baseinfo.coordinate = newList.latLng.lat + ',' + newList.latLng.lng
                                }
                            }, 10)
                        }
                    });
                },
                addFloor() {
                    var objs = JSON.parse(JSON.stringify(this.projectMainList[this.projectMainList.length - 1]))
                    objs.isAdd = true
                    this.projectMainList.push(objs)
                    this.ztTabId = 'x' + (this.projectMainList.length - 1)
                },
                cancels() {
                    var index = parent.layer.getFrameIndex(window.name); //获取窗口索引
                    parent.layer.close(index);
                },
                confirms() {
                    var that = this
                    if (!this.baseinfo.name) {
                        this.$message({
                            message: '请输入工程名称',
                            type: 'warning',
                            duration: 1000
                        });
                        return false
                    }
                    // if (!this.baseinfo.constructionUnitId) {
                    //     this.$message({
                    //         message: '请选择建设单位',
                    //         type: 'warning',
                    //         duration: 1000
                    //     });
                    //     return false
                    // }
                    // if (!this.baseinfo.license) {
                    //     this.$message({
                    //         message: '请输入施工许可证号',
                    //         type: 'warning',
                    //         duration: 1000
                    //     });
                    //     return false
                    // }
                    if (!this.baseinfo.coordinate) {
                        this.$message({
                            message: '请选择工程位置',
                            type: 'warning',
                            duration: 1000
                        });
                        return false
                    }
                    // if (!this.baseinfo.authCode) {
                    //     this.$message({
                    //         message: '请输入授权码',
                    //         type: 'warning',
                    //         duration: 1000
                    //     });
                    //     return false
                    // }
                    if (this.projectMainList.length == 0) {
                        this.$message({
                            message: '请添加主体信息',
                            type: 'warning',
                            duration: 1000
                        });
                        return false
                    }
                    for (var i = 0; i < this.projectMainList.length; i++) {
                        if (!this.projectMainList[i].name) {
                            this.$message({
                                message: '请输入' + (i + 1) + '号楼的名称',
                                type: 'warning',
                                duration: 1000
                            });
                            return false
                        }
                        if (this.projectMainList[i].topFloor == 0 || this.projectMainList[i].topFloor < 0) {
                            this.$message({
                                message: '请输入' + (i + 1) + '号楼的地上楼层数',
                                type: 'warning',
                                duration: 1000
                            });
                            return false
                        }
                    }
                    if (this.allryList.length == 0) {
                        this.$message({
                            message: '请添加项目经理',
                            type: 'warning',
                            duration: 1000
                        });
                        return false
                    }
                    for (var i = 0; i < this.allryList.length; i++) {
                        if (this.allryList[i].gw == '项目经理' && this.allryList[i].ryList.length == 0) {
                            this.$message({
                                message: '请添加项目经理',
                                type: 'warning',
                                duration: 1000
                            });
                            return false
                        }
                    }
                    for (var i = 0; i < this.allryList.length; i++) {
                        for (var j = 0; j < this.allryList[i].ryList.length; j++) {
                            if (this.allryList[i].ryList[j].ryxm.length == 0) {
                                this.$message({
                                    message: '请输入' + this.allryList[i].ryList[j].gw + '的姓名',
                                    type: 'warning',
                                    duration: 1000
                                });
                                return false
                            }
                            if (this.allryList[i].ryList[j].sfzhm.length == 0) {
                                this.$message({
                                    message: '请输入' + this.allryList[i].ryList[j].gw + '的身份证号',
                                    type: 'warning',
                                    duration: 1000
                                });
                                return false
                            }
                            if (this.allryList[i].ryList[j].sfzhm.length > 0 && !IdCardValidate(this.allryList[i].ryList[j].sfzhm)) {
                                this.$message({
                                    message: this.allryList[i].ryList[j].gw + '的身份证号格式错误',
                                    type: 'warning',
                                    duration: 1000
                                });
                                return false
                            }
                            if (this.allryList[i].ryList[j].sjhm.length == 0) {
                                this.$message({
                                    message: '请输入' + this.allryList[i].ryList[j].gw + '的手机号',
                                    type: 'warning',
                                    duration: 1000
                                });
                                return false
                            }
                            if (this.allryList[i].ryList[j].sjhm.length > 0 && !PhoneValidate(this.allryList[i].ryList[j].sjhm)) {
                                this.$message({
                                    message: this.allryList[i].ryList[j].gw + '的手机号格式错误',
                                    type: 'warning',
                                    duration: 1000
                                });
                                return false
                            }
                            for (var k = 0; k < this.allryList[i].ryList[j].ryList.length; k++) {
                                if (this.allryList[i].ryList[j].ryList[k].ryxm.length == 0) {
                                    this.$message({
                                        message: '请输入' + this.allryList[i].ryList[j].gw + '助理的姓名',
                                        type: 'warning',
                                        duration: 1000
                                    });
                                    return false
                                }
                                if (!this.allryList[i].ryList[j].ryList[k].sfzhm || this.allryList[i].ryList[j].ryList[k].sfzhm.length == 0) {
                                    this.$message({
                                        message: '请输入' + this.allryList[i].ryList[j].gw + '助理的身份证号',
                                        type: 'warning',
                                        duration: 1000
                                    });
                                    return false
                                }
                                if (this.allryList[i].ryList[j].ryList[k].sfzhm && this.allryList[i].ryList[j].ryList[k].sfzhm.length > 0 && !IdCardValidate(this.allryList[i].ryList[j].ryList[k].sfzhm)) {
                                    this.$message({
                                        message: this.allryList[i].ryList[j].gw + '助理的身份证号格式错误',
                                        type: 'warning',
                                        duration: 1000
                                    });
                                    return false
                                }
                                if (!this.allryList[i].ryList[j].ryList[k].sjhm || this.allryList[i].ryList[j].ryList[k].sjhm.length == 0) {
                                    this.$message({
                                        message: '请输入' + this.allryList[i].ryList[j].gw + '助理的手机号',
                                        type: 'warning',
                                        duration: 1000
                                    });
                                    return false
                                }
                                if (this.allryList[i].ryList[j].ryList[k].sjhm && this.allryList[i].ryList[j].ryList[k].sjhm.length > 0 && !PhoneValidate(this.allryList[i].ryList[j].ryList[k].sjhm)) {
                                    this.$message({
                                        message: this.allryList[i].ryList[j].gw + '助理的手机号格式错误',
                                        type: 'warning',
                                        duration: 1000
                                    });
                                    return false
                                }
                            }
                        }
                    }
                    // if (this.fileList.length == 0) {
                    //     this.$message({
                    //         message: '请上传附件',
                    //         type: 'warning',
                    //         duration: 1000
                    //     });
                    //     return false
                    // }
                    var peopleList = []
                    var uploadFile = []
                    for (var i = 0; i < this.allryList.length; i++) {
                        if (this.allryList[i].ryList) {
                            for (var j = 0; j < this.allryList[i].ryList.length; j++) {
                                this.allryList[i].ryList[j].assistantList = this.allryList[i].ryList[j].ryList
                                peopleList.push(this.allryList[i].ryList[j])
                            }
                        }
                    }
                    for (var i = 0; i < this.fileList.length; i++) {
                        uploadFile.push(this.fileList[i].fileid + ',' + this.fileList[i].filename + ',' + this.fileList[i].userName + ',' + this.fileList[i].uploadTime)
                    }
                    xLoading(true, '正在提交')
                    $.ajax({
                        type: 'post',
                        headers: {
                            'Content-Type': 'application/json'
                        },
                        url: baseUrl + '/ConstructionPlan/EditProject',
                        data: JSON.stringify({
                            project: {
                                name: that.baseinfo.name,
                                constructionUnitId: that.baseinfo.constructionUnitId,
                                license: that.baseinfo.license,
                                address: that.baseinfo.address,
                                ConstructionUnit: that.baseinfo.constructionUnit,
                                ConstructionControlUnit: that.baseinfo.constructionControlUnit,
                                InvestigationUnit: that.baseinfo.investigationUnit,
                                DesignUnit: that.baseinfo.designUnit,
                                coordinate: that.baseinfo.coordinate,
                                // authCode: that.baseinfo.authCode,
                                pullCode: that.baseinfo.pullCode,
                                uploadFile: uploadFile.join('|'),
                                id: that.recid
                            },
                            peopleList: peopleList,
                            projectMainList: that.projectMainList
                        }),
                        dataType: 'json',
                        success: function (res) {
                            xLoading(false)
                            if (!res.success) {
                                that.$message({
                                    message: res.msg ? res.msg : '程序错误，请重试',
                                    type: 'error'
                                });
                                return false;
                            }
                            that.$message({
                                message: '已修改',
                                type: 'success'
                            });
                            setTimeout(function () {
                                var index = parent.layer.getFrameIndex(window.name); //获取窗口索引
                                parent.layer.close(index);
                            }, 500)
                            return false
                            var html = ''
                            for (var j = 0; j < res.data.length; j++) {
                                var str = '<p>' + res.data[j] + '</p>'
                                html += str
                            }
                            that.$confirm(html, '提示', {
                                confirmButtonText: '确定',
                                cancelButtonText: '取消',
                                showCancelButton: false,
                                customClass: 'tips_popup',
                                closeOnClickModal: false,
                                closeOnPressEscape: false,
                                dangerouslyUseHTMLString: true,
                                type: 'warning'
                            }).then(function () {
                                setTimeout(function () {
                                    var index = parent.layer.getFrameIndex(window.name); //获取窗口索引
                                    parent.layer.close(index);
                                }, 500)
                            }).catch(function () {
                            });
                        }
                    });
                },
                httprequest(file) {
                    var that = this
                    xLoading(true, '正在上传')
                    var formData = new FormData();
                    formData.append('files', file.file);
                    $.ajax({
                        type: 'post',
                        url: baseUrl + '/Common/UploadFile?method=UploadFile&type=OSS',
                        data: formData,
                        dataType: 'json',
                        contentType: false,
                        processData: false,
                        success: function (res) {
                            xLoading(false)
                            if (!res.success) {
                                that.$message({
                                    message: res.msg,
                                    type: 'error'
                                });
                                return false;
                            }
                            var newobj = {
                                fileid: res.data.fileId,
                                filename: res.data.fileName,
                                fileurl: res.data.ossUrl,
                                uploadTime: res.data.uploadTime,
                                userName: res.data.userName
                            }
                            that.fileList.push(newobj)
                        }
                    });
                },
                prevewImg(filename, urls) {
                    if (getFileType(filename) == 'IMG') {
                        this.previewList = [urls];
                        setTimeout(function () {
                            var viewer = new Viewer(document.getElementById('jq22'), {
                                hide: function () {
                                    viewer.destroy();
                                }
                            });
                            viewer.show();
                        }, 10);
                        return false
                    }
                    if (getFileType(filename) == 'PDF') {
                        parent.layer.open({
                            type: 2,
                            title: 'pdf预览',
                            shadeClose: true,
                            shade: 0.8,
                            area: ['98%', '98%'],
                            content: '/ApsPublic/pdf/web/viewer.html?file=' + encodeURIComponent(urls),
                            end: function () { }
                        });
                        return false
                    }
                    publicdownFile(filename, urls)
                },
                downImg(filename, urls) {
                    publicdownFile(filename, urls)
                },
                removeImg(arr, index, types, items) {
                    var that = this
                    var title = '此操作将永久删除该文件, 是否继续?'
                    if (types == 1 || types == 2 || types == 3) {
                        title = '此操作将永久删除该数据, 是否继续?'
                    }
                    this.$confirm(title, '提示', {
                        confirmButtonText: '确定',
                        cancelButtonText: '取消',
                        type: 'warning'
                    }).then(function () {
                        arr.splice(index, 1)
                        if (types == 2) {
                            that.ztTabId = 'x' + (arr.length - 1)
                        }
                        if (types == 3) {
                            items.ryTabId = 'z' + (arr.length - 1)
                        }
                        that.$forceUpdate()
                    }).catch(function () {
                    });
                },
                getQyAllryDAta() {
                    var that = this
                    xLoading(true)
                    $.ajax({
                        type: 'post',
                        headers: {
                            'Content-Type': 'application/json'
                        },
                        url: baseUrl + '/ConstructionPlan/GetCompanyAllUser',
                        data: {},
                        dataType: 'json',
                        success: function (res) {
                            xLoading(false)
                            if (!res.success) {
                                that.$message({
                                    message: res.msg ? res.msg : '程序错误，请重试',
                                    type: 'error'
                                });
                                return false;
                            }
                            that.restaurants = res.data
                        }
                    });
                },
                GetGwList() {
                    var that = this
                    xLoading(true)
                    $.ajax({
                        type: 'post',
                        headers: {
                            'Content-Type': 'application/json'
                        },
                        url: baseUrl + '/ConstructionPlan/GetGwList',
                        data: {},
                        dataType: 'json',
                        success: function (res) {
                            xLoading(false)
                            if (!res.success) {
                                that.$message({
                                    message: res.msg ? res.msg : '程序错误，请重试',
                                    type: 'error'
                                });
                                return false;
                            }
                            for (var i = 0; i < res.data.length; i++) {
                                res.data[i].ryList = []
                                res.data[i].ryTabId = 'z0'
                            }
                            that.allryList = res.data
                            that.getDetail()
                        }
                    });
                },
                // 获取地址
                getAddress() {
                    var that = this
                    xLoading(true)
                    $.ajax({
                        type: 'post',
                        headers: {
                            'Content-Type': 'application/json'
                        },
                        url: baseUrl + '/ConstructionPlan/GetResiterAddress',
                        data: {},
                        dataType: 'json',
                        success: function (res) {
                            xLoading(false)
                            if (!res.success) {
                                that.$message({
                                    message: res.msg ? res.msg : '程序错误，请重试',
                                    type: 'error'
                                });
                                return false;
                            }
                            that.mapCity = res.data.zcd2
                        }
                    });
                },
                // 获取地基基础类型， 屋顶结构，结构类型的选项
                GetdjData() {
                    var that = this
                    xLoading(true)
                    $.ajax({
                        type: 'post',
                        headers: {
                            'Content-Type': 'application/json'
                        },
                        url: baseUrl + '/Common/GetDictList',
                        data: JSON.stringify({
                            typename: 'foundation'
                        }),
                        dataType: 'json',
                        success: function (res) {
                            xLoading(false)
                            if (!res.success) {
                                that.$message({
                                    message: res.msg ? res.msg : '程序错误，请重试',
                                    type: 'error'
                                });
                                return false;
                            }
                            that.djData = res.data
                        }
                    });
                },
                // 获取地基基础类型， 屋顶结构，结构类型的选项
                GetwdjgData() {
                    var that = this
                    xLoading(true)
                    $.ajax({
                        type: 'post',
                        headers: {
                            'Content-Type': 'application/json'
                        },
                        url: baseUrl + '/Common/GetDictList',
                        data: JSON.stringify({
                            typename: 'roof'
                        }),
                        dataType: 'json',
                        success: function (res) {
                            xLoading(false)
                            if (!res.success) {
                                that.$message({
                                    message: res.msg ? res.msg : '程序错误，请重试',
                                    type: 'error'
                                });
                                return false;
                            }

                            that.wdjgData = res.data
                        }
                    });
                },
                // 获取地基基础类型， 屋顶结构，结构类型的选项
                GetjglxData() {
                    var that = this
                    xLoading(true)
                    $.ajax({
                        type: 'post',
                        headers: {
                            'Content-Type': 'application/json'
                        },
                        url: baseUrl + '/Common/GetDictList',
                        data: JSON.stringify({
                            typename: 'structure'
                        }),
                        dataType: 'json',
                        success: function (res) {
                            xLoading(false)
                            if (!res.success) {
                                that.$message({
                                    message: res.msg ? res.msg : '程序错误，请重试',
                                    type: 'error'
                                });
                                return false;
                            }

                            that.jglxData = res.data
                        }
                    });
                },
                getDetail2() {
                    var that = this
                    xLoading(true)
                    $.ajax({
                        type: 'post',
                        headers: {
                            'Content-Type': 'application/json'
                        },
                        url: baseUrl + '/ConstructionPlan/GetProject',
                        data: JSON.stringify({
                            id: that.recid
                        }),
                        dataType: 'json',
                        success: function (res) {
                            xLoading(false)
                            if (!res.success) {
                                that.$message({
                                    message: res.msg ? res.msg : '程序错误，请重试',
                                    type: 'error'
                                });
                                return false;
                            }
                            for (var i = 0; i < that.allryList.length; i++) {
                                that.allryList[i].ryList = []
                                for (var j = 0; j < res.data.peopleList.length; j++) {
                                    if (res.data.peopleList[j].gw == that.allryList[i].gw) {
                                        res.data.peopleList[j].ryList = res.data.peopleList[j].assistantList
                                        res.data.peopleList[j].zlTabId = 'm' + (res.data.peopleList[j].assistantList.length - 1)
                                        that.allryList[i].ryList.push(res.data.peopleList[j])
                                    }
                                }
                            }
                        }
                    });
                },
                // 获取详情
                getDetail() {
                    var that = this
                    xLoading(true)
                    $.ajax({
                        type: 'post',
                        headers: {
                            'Content-Type': 'application/json'
                        },
                        url: baseUrl + '/ConstructionPlan/GetProject',
                        data: JSON.stringify({
                            id: that.recid
                        }),
                        dataType: 'json',
                        success: function (res) {
                            xLoading(false)
                            if (!res.success) {
                                that.$message({
                                    message: res.msg ? res.msg : '程序错误，请重试',
                                    type: 'error'
                                });
                                return false;
                            }
                            for (var j in res.data.project) {
                                if (j != 'uploadFile') {
                                    that.baseinfo[j] = res.data.project[j]
                                }
                            }
                            for (var i = 0; i < that.allryList.length; i++) {
                                for (var j = 0; j < res.data.peopleList.length; j++) {
                                    if (res.data.peopleList[j].gw == that.allryList[i].gw) {
                                        res.data.peopleList[j].ryList = res.data.peopleList[j].assistantList
                                        res.data.peopleList[j].zlTabId = 'm' + (res.data.peopleList[j].assistantList.length - 1)
                                        that.allryList[i].ryList.push(res.data.peopleList[j])
                                    }
                                }
                            }
                            that.projectMainList = []
                            for (var i = 0; i < res.data.projectMainList.length; i++) {
                                that.projectMainList.push({
                                    id: res.data.projectMainList[i].id,
                                    name: res.data.projectMainList[i].name,
                                    floor: res.data.projectMainList[i].floor,
                                    description: res.data.projectMainList[i].description,
                                    topFloor: res.data.projectMainList[i].topFloor,
                                    downFloor: res.data.projectMainList[i].downFloor,
                                    structureId: res.data.projectMainList[i].structureId,
                                    roofId: res.data.projectMainList[i].roofId,
                                    foundationId: res.data.projectMainList[i].foundationId,
                                    foundationName: res.data.projectMainList[i].foundationName,
                                    roofName: res.data.projectMainList[i].roofName,
                                    structureName: res.data.projectMainList[i].structureName,
                                })
                            }
                            that.ztTabId = 'x0'
                            if (res.data.project.uploadFile && res.data.project.uploadFile.length > 0) {
                                for (var i = 0; i < res.data.project.uploadFile.split('|').length; i++) {
                                    that.fileList.push({
                                        fileid: res.data.project.uploadFile.split('|')[i].split(',')[0],
                                        filename: res.data.project.uploadFile.split('|')[i].split(',')[1],
                                        fileurl: baseUrl + '/DataInput/FileService?method=DownloadFile&fileid=' + res.data.project.uploadFile.split('|')[i].split(',')[0],
                                        uploadTime: res.data.project.uploadFile.split('|')[i].split(',')[3],
                                        userName: res.data.project.uploadFile.split('|')[i].split(',')[2],
                                    })
                                }
                            }
                        }
                    });
                }
            },
            mounted() {
                this.showApp = true;
                this.recid = getQuerys('recid')
                this.companyId = getQuerys('companyId')
                this.GetdjData()
                this.GetwdjgData()
                this.GetjglxData()
                this.GetGwList()
                this.getAddress()
                this.getQyAllryDAta()
                // getQuerys()
            }
        });
    </script>
</body>
<style>
    .contetn_box {
        padding: 10px 1.56vw 2.06vh;
        overflow: auto;
        height: calc(100% - 10px);
    }

    .cell_cont {
        border: 1px solid #EBEBEB;
        padding: 3.09vh 2.43vw;
    }

    .cell_box {}

    .cell_title {
        display: flex;
        align-items: center;
        padding: 10px 0;
        height: 52px;
    }

    .cell_but {
        padding-left: 10px;
    }

    .item_tab {}

    .tab_box {
        height: 32px;
    }

    .tab_box .el-tabs__header {
        margin: 0;
    }

    .tab_box .el-tabs__item {
        height: 32px;
        line-height: 32px;
    }

    .tab_cont {
        height: 198px;
        border: 1px solid #EBEBEB;
    }

    .tab_form_box {
        display: flex;
        align-items: center;
    }

    .tab_form_cont {
        width: calc(100% - 96px);
    }

    .tab_form_cont .el-input__inner {
        padding: 0 10px !important;
    }

    .el-input.is-disabled .el-input__inner {
        color: #333;
    }

    .tab_form_name {
        width: 96px;
        padding-right: 10px;
        text-align: right;
    }

    .tab_box .el-tabs__nav-next,
    .tab_box .el-tabs__nav-prev {
        line-height: 32px;
        width: 20px;
        display: flex;
        align-items: center;
        justify-content: center;
        height: 32px;
        border-top: 1px solid #E4E7ED;
    }

    .tab_box .el-tabs__nav-next {
        border-right: 1px solid #E4E7ED;
    }

    .tab_box .el-tabs__nav-prev {
        border-left: 1px solid #E4E7ED;
    }

    .tab_box .el-tabs__nav-next::after {
        content: '';
        display: block;
        position: absolute;
        left: -1px;
        top: 0;
        width: 1px;
        height: 100%;
        background: #E4E7ED;
    }

    .tab_box .el-tabs--card>.el-tabs__header .el-tabs__nav {
        border-radius: 0;
    }

    .tab_box .el-tabs__nav-scroll {
        position: relative;
    }

    .tab_box .el-tabs__nav-scroll::before {
        content: '';
        display: block;
        position: absolute;
        left: 0;
        top: 0;
        width: 1px;
        height: 100%;
        background: #E4E7ED;
    }

    .tab_box .el-tabs__item.is-active {
        position: relative;
    }

    .tab_box .el-tabs__item.is-active::before {
        content: '';
        display: block;
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        height: 2px;
        background: #5574D7;
    }

    .tab_title {
        display: flex;
        align-items: center;
    }

    .form_box {
        display: flex;
        align-items: center;
        width: calc(50% - 15px);
    }

    .form_box .el-input.is-disabled .el-input__inner {
        background: #ffffff;
    }

    .form_name {
        width: 104px;
        padding-right: 10px;
        text-align: right;
    }

    .form_cont {
        padding-right: 10px;
        width: calc(100% - 166px);
        padding-right: 10px;
    }

    .ry_item {
        border: 1px solid #EBEBEB;
        /* padding: 0 10px; */
        margin-bottom: 20px;
    }

    .ry_top {
        height: 72px;
        display: flex;
        align-items: center;
    }

    .ry_title {
        font-weight: bold;
        width: 138px;
        padding-right: 10px;
        text-align: right;
    }

    .ry_cont {
        padding-bottom: 10px;
    }

    .ry_tab_cont {
        /* height: 94px; */
        border: none;
        border-top: 1px solid #EBEBEB;
        align-items: center;
    }

    .ry_tab_cont_form {
        display: flex;
        padding: 30px 20px;
        align-items: center;
    }

    .ry_form_box {
        display: flex;
        align-items: center;
    }

    .ry_form_name {
        white-space: nowrap;
        padding-right: 10px;
    }

    .el-tabs__item.is-disabled {
        padding: 0 !important;
    }

    .ry_form_but {
        width: 30px;
        min-width: 30px;
        text-align: right;
        margin-left: 10px;
        color: #5574D7;
        cursor: pointer;
    }

    .public_popup_box {
        height: 100%;
    }

    .public_popup_cell_box {
        padding: 2.77vh 2.08vw 0;
        height: calc(100% - 70px);
        overflow: auto;
    }

    .public_popup_cell_item {
        display: flex;
        align-items: center;
        margin-bottom: 20px;
    }

    .public_popup_cell_name {
        width: 60px;
        text-align: right;
        min-width: 60px;
    }

    .public_popup_cell_cont {
        flex: 1;
        padding-left: 10px;
    }

    .public_popup {
        height: 340px;
    }

    .el-autocomplete-suggestion__list li {
        line-height: normal;
        padding: 7px;
    }

    .el-autocomplete-suggestion__list li .name {
        text-overflow: ellipsis;
        overflow: hidden;
    }

    .el-autocomplete-suggestion__list li .addr {
        font-size: 12px;
        color: #b4b4b4;
    }

    .el-autocomplete-suggestion__list li .highlighted .addr {
        color: #ddd;
    }

    .tips_popup {
        width: 600px;
    }

    .tips_popup .el-message-box__content {
        max-height: 50vh;
        overflow-y: auto;
    }

    .el-input.is-disabled .el-input__inner {
        background: #fff;
    }
</style>

</html>